package com.acceptable.qucun.user.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.lang.NonNull;

// 传输给页面的用户数据
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class UserInfo {
    private Integer userId;
    private String nickname;
    private Long usedVolume;
    private Long totalVolume;
    private Boolean isRemember = false;
    // 头像

    // 获取分享链接的内容时 源用户的信息
    public void setShareSourceUserInfo(@NonNull User user){
        this.userId = user.getUserId();
        this.nickname = user.getNickname();
    }
}
